package com.shi.dockerdemo.controller;

import com.shi.dockerdemo.domain.User;
import com.shi.dockerdemo.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@RestController
public class UserController {

    @Resource
    private UserService userService;

    @GetMapping("/user/get")
    public List<User> getUser(){
        List<User> list = userService.list();
        log.info("获取所有的用户信息: {}",list);
        return list;
    }
}
